package com.zhang.blog.controller;

import com.zhang.blog.service.SysUserService;
import com.zhang.blog.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName: UsersController
 * @Auther: dell
 * @Date: 2021/10/31 19:27
 * @Description:
 */
@RestController
@RequestMapping("users")
public class UsersController {
    @Autowired
    private SysUserService sysUserService;
    @GetMapping("currentUser")
    public Result currentUser(@RequestHeader("Authorization") String token){

        return sysUserService.findUserByToken(token);
    }
}

